
const mongoose = require('mongoose')

const Scheme = mongoose.Schema

const userType = {
    "id": Number,
    "username": String,
    "password": String,
    "role": { type: Scheme.Types.ObjectId, ref: 'role' },
    "default": Boolean,
    "gender": Number,
    "introduction": String,
    "avatarUrl": String
}

const userModel = mongoose.model('user', new Scheme(userType))

module.exports = userModel